import Vue from "vue";
import VueRouter from "vue-router";
import Homebar from "../components/tabbar/HomeContainer.vue"
import Memberbar from "../components/tabbar/MemberContainer.vue"
import Shopcarbar from "../components/tabbar/ShopcarContainer.vue"
import Searchbar from "../components/tabbar/SearchContainer.vue"
import Newlist from "../components/news/NewList.vue"
import NewInfo from '../components/news/NewInfo.vue'
import Photos from "../components/photos/Photos.vue"
import PhotosInfo from "../components/photos/PhotosInfo.vue"

Vue.use(VueRouter);

let router = new VueRouter({
    routes:[
        {path:"/",redirect:'/home'},
        {path:"/home",component:Homebar},
        {path:"/member",component:Memberbar},
        {path:"/shopcar",component:Shopcarbar},
        {path:"/search",component:Searchbar},
        {path:"/home/newlist",component:Newlist},
        {path:"/home/newinfo/:id",component:NewInfo},
        {path:"/home/photos",component:Photos},
        {path:"/home/photosinfo/:id",component:PhotosInfo}
    ],
    linkActiveClass:"mui-active"//改变路由自带的router-link-active使点击路由高亮
})

export default router;

